#include "MyWindow.hpp"
#include "MyImage.hpp"
#include "MyRendererUtil.hpp"
#include "MyMath.hpp"
#include <cmath>

int main()
{
    Window::InitializeWindow();

    Window window("Test Window", 800, 600);

    Framebuffer fb(800, 600);

    fb.ClearColor(Vector4<float>(1.0f, 1.0f, 1.0f, 1.0f)); 
    fb.ClearDepth(1.0f);

    Vector4<float> color(0.0f, 0.0f, 0.0f, 1.0f);

    RendererUtil::DrawTriangle(
        fb,
        200, 100,
        500, 300,
        100, 500,
        Vector4<float>(1, 0, 0, 1),
        0.5f
    );

    while (!window.ShouldClose())
    {
        window.PollEvents();

        window.DrawBuffer(fb);

        Sleep(10);
    }

    Window::DestroyWindow();
    return 0;
}
